package com.fqgj.sentry.controller;

import com.fqgj.sentry.biz.store.DecisionDataSave;
import com.fqgj.sentry.common.response.ApiOutput;
import com.fqgj.sentry.api.domain.request.DataCallbackVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by liupengpeng on 2017/8/10.
 */
@RequestMapping("/services/data")
@RestController
public class DataCallbackController {

    @Autowired
    private DecisionDataSave decisionDataSave;

    /**
     * 保存回调数据
     *
     * @param dataCallbackVo
     * @return
     */
    @RequestMapping(value = "/callback", method = RequestMethod.POST)
    public ApiOutput decisionResult(@RequestBody DataCallbackVo dataCallbackVo) {
        decisionDataSave.saveCallBackData(dataCallbackVo);
        return new ApiOutput<>();
    }


}
